import json


class Car_config:
    def __init__(self, arrive, depart, route, type):
        self.arrive = arrive
        self.depart = depart
        self.route = route
        self.type = type

    @classmethod
    def from_json(cls, json_dict):
        # json_dict = json.loads(json_string)
        return cls(
            arrive=json_dict['arrive'],
            depart=json_dict['depart'],
            route=json_dict['route'],
            type=json_dict['type']

        )


class MTF_Car_config:
    def __init__(self, depart, route):

        self.depart = depart
        self.route = route


    @classmethod
    def from_json(cls, json_dict):
        # json_dict = json.loads(json_string)
        return cls(
            depart=json_dict['depart'],
            route=json_dict['route'],
        )

